package com.xian.cloud.config;


import com.xian.cloud.interceptor.WechatInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;


/**
 * @Auther: xlr
 * @Date: 2018/10/23 10:40
 * @Description:
 */
@Configuration("webConfig")
public class WebConfig extends WebMvcConfigurerAdapter {

    /**
     * 注册 拦截器
     */
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new WechatInterceptor());
    }

}
